/*#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>


int main()
{
	int n, k,i,j;
	
	
	while (scanf("%d %d", &n, &k) != EOF)
	{
		char a[1001] = { 0 };
		for (i = 1; i <= k; i++)
		{
			int m = 1;
			for (j = i; j <= n; j = i * m)
			{
				if (a[j] == 1)
					a[j] = 0;
				else
					a[j] = 1;
				m++;
			}
		}
		for (i = 1; i <= n; i++)
		{

			if (a[i] == 0)
				printf("%d ", i);
		}
		printf("\n");
	}
	return 0;
}*/